//
//  LoadViewController.m
//  MobileGameLiving2
//
//  Created by reflection on 15/9/1.
//  Copyright (c) 2015年 李旭东. All rights reserved.
//

#import "LoadViewController.h"
#import "SetTableViewController.h"

@interface LoadViewController ()
@property (weak, nonatomic) IBOutlet UITextField *userName;
@property (weak, nonatomic) IBOutlet UITextField *password;

@end

@implementation LoadViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (IBAction)userLoad:(id)sender {
    if ([self.userName.text isEqual:@"123"] && [self.password.text isEqual:@"456"]) {
//        SetTableViewController *setTVC = [[SetTableViewController alloc]initWithNibName:@"SetTableViewController" bundle:nil];
        [self.navigationController popViewControllerAnimated:YES];
    }else{
        UIAlertView *wrongUser = [[UIAlertView alloc]initWithTitle:@"错误" message:@"用户名或密码错误" delegate:self cancelButtonTitle:@"重试" otherButtonTitles:nil, nil];
        [wrongUser show];
    }
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
